import api from './api';
import { AccountInfo } from '../types/account';
import { ApiResponse } from '../types/auth';
import { AxiosResponse } from 'axios';

/**
 * 获取当前用户绑定的Cursor账号信息
 * @returns Promise<AxiosResponse<ApiResponse<AccountInfo>>>
 */
export const getCurrentAccount = (): Promise<AxiosResponse<ApiResponse<AccountInfo>>> => {
    return api.post('/account/current');
}; 

/**
 * 刷新当前用户的Cursor账号状态
 * @returns Promise<AxiosResponse<ApiResponse<AccountInfo>>>
 */
export const refreshCurrentAccount = (): Promise<AxiosResponse<ApiResponse<AccountInfo>>> => {
    return api.post('/account/refresh');
}; 